-- GENERATED SPELL FOR [Dalronn the Controller] --


function spell0_27389(pUnit, Event) --@Debilitate,n/a--
pUnit:FullCastSpellOnTarget(43650,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27389', 8000, 1)
end

function spell1_27389(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(43649,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27389', 2000, 1)
end

function spell2_27389(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(59575,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27389', 2000, 1)
end

function spell3_27389(pUnit, Event) --@Summon Skeletons,n/a--
pUnit:FullCastSpellOnTarget(52611,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27389', 2000, 1)
end

function Sorts_27389(pUnit, Event)
local choix_sorts_27389 = math.random(0, 3)
if choix_sorts_27389 == 0 then
pUnit:RegisterEvent('spell0_27389', 1, 1)
end
if choix_sorts_27389 == 1 then
pUnit:RegisterEvent('spell1_27389', 1, 1)
end
if choix_sorts_27389 == 2 then
pUnit:RegisterEvent('spell2_27389', 1, 1)
end
if choix_sorts_27389 == 3 then
pUnit:RegisterEvent('spell3_27389', 1, 1)
end
end

function mob27389_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27389', math.random(1500, 3000), 1)
end

function mob27389_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27389_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27389_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27389, 1, 'mob27389_Action')
RegisterUnitEvent(27389, 2, 'mob27389_Leave')
RegisterUnitEvent(27389, 3, 'mob27389_Kill')
RegisterUnitEvent(27389, 4, 'mob27389_Die')
